How to return the entire array in a recursive JavaScript function

join shbcf.ru